home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / umich / music / eked-m1.zoo / src / midi.h < prev    next >
Text File  |  1995-02-19  |  2KB  |  70 lines

  1. /*
  2.  *  EKED-M1 : Editor for Korg M1 synth; midi.h : MIDI defines
  3.  *  Copyright (C) 1995 Steven M. Eker (Steven.Eker@brunel.ac.uk)
  4.  *
  5.  *  This program is free software; you can redistribute it and/or modify
  6.  *  it under the terms of the GNU General Public License as published by
  7.  *  the Free Software Foundation; either version 2 of the License, or
  8.  *  (at your option) any later version.
  9.  *
  10.  *  This program is distributed in the hope that it will be useful,
  11.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.  *  GNU General Public License for more details.
  14.  *
  15.  *  You should have received a copy of the GNU General Public License
  16.  *  along with this program; if not, write to the Free Software
  17.  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  */
  19.  
  20. #define NOTE_OFF    0x80
  21. #define NOTE_ON        0x90
  22. #define POLY_AT        0xA0
  23. #define CTRL_CHG    0xB0
  24. #define PROG_CHG    0xC0
  25. #define CHAN_AT        0xD0
  26. #define BENDER        0xE0
  27.  
  28. #define SYSEX        0xF0
  29. #define MTC_QF        0xF1
  30. #define    SONG_POS    0xF2
  31. #define SONG_SEL    0xF3
  32. #define UNDEF1        0xF4
  33. #define UNDEF2        0xF5
  34. #define TUNE_REQ    0xF6
  35. #define EOX        0xF7
  36. #define M_CLOCK        0xF8
  37. #define UNDEF3        0xF9
  38. #define M_START        0xFA
  39. #define M_CONT        0xFB
  40. #define M_STOP        0xFC
  41. #define UNDEF4        0xFD
  42. #define ACT_SENSE    0xFE
  43. #define SYS_RESET    0xFF
  44.  
  45. /*
  46.  *    Midi status byte macros
  47.  */
  48. #define note_off(e)    (((e) & 0xF0) == NOTE_OFF)
  49. #define note_on(e)    (((e) & 0xF0) == NOTE_ON)
  50. #define poly_at(e)    (((e) & 0xF0) == POLY_AT)
  51. #define ctrl_chg(e)    (((e) & 0xF0) == CTRL_CHG)
  52. #define prog_chg(e)    (((e) & 0xF0) == PROG_CHG)
  53. #define chan_at(e)    (((e) & 0xF0) == CHAN_AT)
  54. #define bender(e)    (((e) & 0xF0) == BENDER)
  55.  
  56. #define two_data_byte(e)    (((e) & 0x60) != 0x40)
  57. #define status_byte(e)        (((e) & 0x80) != 0)
  58. #define data_byte(e)        (((e) & 0x80) == 0)
  59. #define real_time(e)        (((e) & 0xF8) == 0xF8)
  60.  
  61. /*
  62.  *    MIDIfile meta events
  63.  */
  64. #define TEXT_EVENT    0x01
  65. #define COPYRIGHT    0x02
  66. #define TRACK_NAME    0x03
  67. #define TRACK_END    0x2F
  68. #define TEMPO_CHG    0x51
  69. #define TIME_SIG    0x58
  70.